package com.renting.modules.sys.web;

import com.renting.common.entity.ResultList;
import com.renting.modules.sys.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin("*")
public class LogController {

    @Autowired
    LogService logService;

    @RequestMapping("v1/sys/logs")
    public String getLogs() {
        ResultList resultList = new ResultList();
        resultList.setData(logService.getAll());
        return resultList.toJSONString();
    }
}
